import turtle

def tree(branchlen,t):
    if branchlen > 5:
        t.forward(branchlen)
        t.right(20)
        tree(branchlen-15,t)
        t.left(40)
        tree(branchlen-15,t)
        t.right(20)
        t.backward(branchlen)

if __name__ == '__main__':
    t = turtle.Turtle()
    mywin = turtle.Screen()
    t.left(90)
    t.up()
    t.backward(100)
    t.down()
    t.color('red')
    tree(75,t)
    mywin.exitonclick()